package com.example.mq.mqserver.mapper;

import com.example.mq.mqserver.core.Binding;
import com.example.mq.mqserver.core.Exchange;
import com.example.mq.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Gogo
 * @date 2024/8/21 22:42
 */
@Mapper
public interface MetaMapper {
    //创建三个表的方法
    void createExchangeTable();

    void createQueueTable();

    void createBindingTable();

    //三个对象的插入、查找、删除操作
    void insertExchange(Exchange exchange);
    List<Exchange> selectAllExchanges();
    void deleteExchange(String exchangeName);

    void insertQueue(MSGQueue msgQueue);
    List<MSGQueue> selectAllMSGQueues();
    void deleteQueue(String queueName);

    void insertBinding(Binding binding);
    List<Binding> selectAllBindings();
    void deleteBinding(Binding binding);

}
